package com.stmt.analytic.graph.algorithm.bc;

import com.stmt.analytic.graph.algorithm.Pair;

import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;

public class BetweennessCentralityMain {


    public static void main(String[] args) {
        Collection<String> vertices = new ArrayList<>();
        Collection<Pair<String, String>> edges = new ArrayList<>();
        vertices.add("a");
        vertices.add("b");
        vertices.add("c");
        vertices.add("d");
        vertices.add("e");

        edges.add(new Pair<>("a", "b"));
        edges.add(new Pair<>("c", "b"));
        edges.add(new Pair<>("d", "b"));
        edges.add(new Pair<>("e", "b"));
        edges.add(new Pair<>("e", "a"));
        edges.add(new Pair<>("e", "c"));

        BetweennessCentrality bc = BetweennessCentrality.newBuilder()
                .withVertices(vertices)
                .withEdges(edges)
                .build();

        bc.compute();
        System.out.println("The Highest Node and value for Betweennes  " + bc.getBetweennestSource() + "  " + bc.getBetweenness());
    }

}
